<?php
 /**
 * @version $Id: uninstall.easycomments.php 283 2007-12-02 22:34:46Z elkuku $
 * @package EasyComments
 * EasyComments - A Joomla Comment Component
 * Based on akocomment
 * @license Released under the terms of the GNU General Public License (see LICENSE.php in the Joomla! root directory)
 * @Achim Raji (aka cybergurk) - David Jardin (aka SniperSister) - Cedric May - Siegmund Langsch (aka langsch2)
 **/

( defined( '_JEXEC' ) ) or ( defined( '_VALID_MOS' ) ) or die( 'Restricted access' );

function com_uninstall() {
global $database, $mosConfig_absolute_path;	
	# UnInstall Mambot 
  	$botPath = "";
	if($_VERSION->RELEASE == "1.5"){
		$botPath = "plugins";
	} else {
		$botPath = "mambots";
	}
	$database->setQuery( "DELETE FROM #__$botPath WHERE `element`= 'easycomments_bot';");
	$database->query();
    @unlink( $mosConfig_absolute_path."/".$botPath."/content/easycomments_bot.php" );
    @unlink( $mosConfig_absolute_path."/".$botPath."/content/easycomments_bot.xml" );
  echo "EasyComments-Component successfully uninstalled.";
}

?>